﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AutoDownload
{
    class StatusInfo
    {
        private string message;
        private int currentIndex;
        private int totalDownload;

        public bool MessageChanged { get; set; }
        public bool CurrentIndexChanged { get; set; }
        public bool TotalDownloadChanged { get; set; }

        public StatusInfo()
        {
            this.message = null;
            this.currentIndex = -1;
            this.totalDownload = -1;

            this.Reset();
        }

        public string Message
        {
            get { return message; }
            set
            {
                message = value;
                this.MessageChanged = true;
            }
        }

        public int CurrentIndex
        {
            get { return currentIndex; }
            set
            {
                currentIndex = value;
                this.CurrentIndexChanged = true;
            }
        }

        public int TotalDownload
        {
            get { return totalDownload; }
            set
            {
                totalDownload = value;
                this.TotalDownloadChanged = true;
            }
        }

        public void Reset()
        {
            this.MessageChanged = this.CurrentIndexChanged = this.TotalDownloadChanged = false;
        }
    }
}
